Page({
  data: {
    notices:[]
  },
  onLoad(options) {
    this.getNotice()
  },
  // 获取公告列表
  async getNotice() {
    const {code, data:notices} = await wx.http.get('/announcement')
    if (code !== 10000) return wx.utils.toast()
    this.setData({notices})
  }
})
